<?php
//display customer information on account page
if(isset($_SESSION["customer"])) {
	$customerDetails = "";
	$customer = $_SESSION["customer"];
	$sql = mysql_query("SELECT * FROM customers WHERE u_name='$customer';");
	$count = mysql_num_rows($sql);
	
	if ($count == 1) {
		while ($row = mysql_fetch_array($sql)) {
			$id = $row["id"];
			$username = $row["u_name"];
			$customer_name = $row["f_name"]."\n".$row["l_name"];
			$address = $row["address"];
			$email = $row["email"];
			$date_registered = $row["date_registered"];
		}
		$customerDetails .= '<tr><td><strong>Username: </strong>'.$username.'</td></tr>';
		$customerDetails .= '<tr><td><strong>Customer Name: </strong>'.$customer_name.'</td></tr>';
		$customerDetails .= '<tr><td><strong>Address: </strong>'.$address.'</td></tr>';
		$customerDetails .= '<tr><td><strong>Email: </strong>'.$email.'</td></tr>';
		$customerDetails .= '<tr><td><strong>Member Since: </strong>'.$date_registered.'</td></tr>';
	}
	
}
?>